package com.example.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.crm.entity.CustomerTagRelation;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 客户-标签关联Mapper接口
 */
@Mapper
public interface CustomerTagRelationMapper extends BaseMapper<CustomerTagRelation> {
    
    /**
     * 删除客户所有标签关联
     */
    @Delete("DELETE FROM crm_customer_tag_relation WHERE customer_id = #{customerId}")
    int deleteByCustomerId(@Param("customerId") Long customerId);
} 